package com.zyd.blog.persistence.mapper;

import com.zyd.blog.persistence.beans.Comment;
import com.zyd.blog.persistence.beans.CommentReply;
import com.zyd.blog.persistence.beans.CommentReplyNew;
import com.zyd.blog.persistence.beans.ReplyId;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liusongqi
 * @since 2020-02-12
 */
@Repository
public interface CommentReplyMapper extends BaseMapper<CommentReply> {
    List<CommentReplyNew> commentReply(@Param(value = "answerId") String answerId, @Param(value = "state") String state, @Param(value = "userId") String userId);
    List<CommentReplyNew> HTcommentReply(@Param(value = "answerId") String answerId);

    List<CommentReplyNew> Reply(@Param(value = "commentId") String commentId, @Param(value = "state") String state, @Param(value = "userId") String userId);

    Integer fabulous(@Param(value = "replyId") String replyId);

    Integer reduceZan(@Param(value = "replyId") String replyId);

    //添加评论回复
    Integer fabulousReply(String replyId, String userId);

    List<CommentReply> pid(@Param(value = "commentId") String commentId);

    Integer deleteCommentReply(@Param(value = "replyId") String replyId);

    List<ReplyId> commentAll(String id);

    Integer stopUser(String userId);

    Integer passUser(String userId);
}
